<template>
	<view class="mines">
		<view class="mine">
			<view class="mine-title">
				姓名 <text>*</text>
			</view>
			<view class="mine-cont">
				{{name}}
			</view>
		</view>
		<view class="mine">
			<view class="mine-title">
				手机号码 <text>*</text>
			</view>
			<view class="mine-cont">
				<input type="number" name="" id="" v-model="iphone" placeholder="请留下你的手机号码">
			</view>
		</view>
		<view class="bott">
			<button @click="submit(iphone)">保存</button>
		</view>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				name:'YAO',
				iphone:''
				
				
			}
		},
		onLoad() {
	
		},
		methods: {
			submit:function( id){
				console.log(id)
				if(id == ''){
					uni.showToast({
						title:"请输入正确的手机号码",
						icon:'error',
						duration: 3000
					})
				}else{
					uni.showToast({
						title:"保存成功",
						icon:'error',
						duration: 6000,
						success: (res) => {
							uni.switchTab({
								url:'./me'
							})
						}
					})
				}
			}
	
		}
	}
	
	
</script>

<style>
	.mines{font-size: 14px;}
	.mine{padding: 10px; border-bottom: 1px solid #ccc;box-sizing: border-box;}
	.mine-title text{color: #f00;margin-left:5px;}
	.mine-title{margin-bottom: 10px;}
	.bott{width: 100%;}
	.bott button{background-color: #f00;color: #fff;border-radius: 20px;width: 60%;margin:20px auto;line-height: 30px;font-size: 14px;}
</style>